package com.dengbw.systemtransfer.mapper;

import com.dengbw.systemtransfer.interfaces.MyBaseMapper;
import com.dengbw.systemtransfer.model.db.SysCorpVillage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author dengbw
 * @date 2021/11/2 4:49 下午
 */
@Mapper
public interface SysCorpVillageMapper extends MyBaseMapper<SysCorpVillage> {
    @Select("SELECT sub_tenant_id FROM sys_corp_village WHERE tenant_id = #{corpId} AND gb_flag = 1")
    List<Long> getGuanli(String corpId);
    @Select("SELECT sub_tenant_id FROM sys_corp_village WHERE tenant_id = #{corpId} AND lt_flag = 1")
    List<Long> getFuwu(String corpId);
    @Select("SELECT sub_tenant_id FROM sys_corp_village WHERE tenant_id = #{corpId} AND lt_flag = 0 AND gb_flag = 0")
    List<Long> getCun(String corpId);
}
